It can be difficult to tell the difference from HTML to XHTML at first glance. XHTML is a much more strict version of HTML. Some of the differences are small such as all the tags must be lowercase, and every tag has to be closed. There are, however, other large changes such as the fact that nothing other than layout formatting is allowed in XHTML. The advantage to using XHTML is that you know that your page will display correctly using different browsers.
Tags That Change:
1) HTML:
<br>XHTML:
2) HTML:
XHTML:
3)HTML:
XHTML:
4)HTML:
XHTML:
5)HTML:
XHTML:
6)HTML:
XHTML:
7)HTML:
XHTML:
8)HTML:
XHTML:
9)HTML:
XHTML:
10)HTML:
XHTML:
Examples of code snippets that change:
1)
HTML:
XHTML:
2)HTML:
XHTML:
3)HTML:
<script language="JavaScript"><!-- document.write("Hello World!") --></script>XHTML:
<script type="text/javascript"> /* <![CDATA[ */ document.write("Hello World!") /* ]]> */ </script>4)HTML:
XHTML:
5) HTML:
XHTML:
<style type="text/css"> /*<![CDATA[*/ p.center {text-align: center} /*]]>*/ </style> <p class='center'>Whatever</p>Helpful Links
http://www.w3schools.com/xhtml/xhtml_intro.asp
http://www.devguru.com/technologies/xhtml/QuickRef/xhtml_coding_rules.html
http://personalweb.about.com/od/basichtml/a/409xhtml.htm